package com.fm.imgreader;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

/**
 * @author leo.li
 */
public interface DivisibleImageAnalyer extends ImageAnalyzer {
    BufferedImage removeBackgroud(InputStream inputStream) throws IOException;
    List<BufferedImage> splitImage(BufferedImage img) throws IOException;

    default BufferedImage removeBackgroud(File file) throws IOException {
        return removeBackgroud(new FileInputStream(file));
    }
}
